const ApiModulesFile = import.meta.glob('./**/index.ts', {
  eager: true,
})
const ApiModules: { [key: string]: any } = {}
Object.keys(ApiModulesFile).map((path) => {
  const fileName = path.match(/.\/(\S*)\/index.ts/)?.[1]
  ApiModules[fileName.toUpperCase() + 'API'] = ApiModulesFile[path]
})

export default ApiModules
